function showTips(_obj, _location) {
	_obj.tooltip({
		content: $('<div></div>'),
		position: 'right',
		showEvent: 'mouseenter',
		onUpdate: function(content) {
			content.panel({
				width: 200,
				border: false,
				title: '摊位明细' + _location,
				href: '../showtip.html?id=' + _location
			});
		},
		onShow: function() {
			var t = $(this);
			t.tooltip('tip').unbind().bind('mouseenter', function() {
				t.tooltip('show');
			}).bind('mouseleave', function() {
				t.tooltip('hide');
			});
		}
	});
}

function CreateAreaData(_data) {
	var _areaData = new Array();
	for(var i = 1; i <= _data.len; i++) {
		_areaData[i] = new Object();
		if(_data.type === "vertical") {
			_areaData[i].x1 = _data.x1;
			_areaData[i].y1 = _data.y1 - _data.offset * (i - 1);
			_areaData[i].x2 = _data.x2;
			_areaData[i].y2 = _data.y2 - _data.offset * (i - 1);
		}
		if(_data.type === "horizontal") {
			_areaData[i].x1 = _data.x1 - _data.offset * (i - 1);
			_areaData[i].y1 = _data.y1;
			_areaData[i].x2 = _data.x2 - _data.offset * (i - 1);
			_areaData[i].y2 = _data.y2;

		}
		_areaData[i].id = "area" + (_data.firstnum + i - 1);
		_areaData[i].location = _data.location;
	}
	return _areaData;
}

function CreateAreaHTML(_areaData) {
	var content = "";
	for(i = 1; i < _areaData.length; i++) {
		var prefix = "#" + i;
		console.log(i);
		content += "<area shape='rect' ";
		content += "coords='" + _areaData[i].x1 + "," + _areaData[i].y1 + "," + _areaData[i].x2 + "," + _areaData[i].y2 + "'";
		content += " href='#'   ondblclick='BoostDetail()' id='" + _areaData[i].id + "' />";
	}
	return content;
}